#pragma once

#include "hidl/HidlSupport.h"
#include "vendor/ecarx/xma/pki/1.0/IPKI.h"
#include "vendor/ecarx/xma/pki/1.0/types.h"
#include <cstdint>
#include <memory>
#include <vector>

namespace vendor::ecarx::xma::pki::V1_0::implementation {
struct PKIHal {
  virtual ~PKIHal() = default;
  virtual Certification readCertificate(StatusCode *outStatus) = 0;
  virtual Certification readSWK3Certificate(const android::hardware::hidl_string& filename, StatusCode *outStatus) = 0;
  virtual StatusCode updatePKIInstallStatus(PKIInstallPlatform clientId , InstallStatus status) = 0;
  virtual std::vector<uint8_t> readSecurityInfoChecksum() = 0;
  virtual StatusCode
  writeBlock(int32_t offset,
             const android::hardware::hidl_vec<int8_t> &bytesData) = 0;
};

std::unique_ptr<PKIHal> makePKIHal();
} // namespace vendor::ecarx::xma::pki::V1_0::implementation